翻訳と辞書
Words near each other
・ Linette Beaumont
・ Lineup
・ Lineus
・ Lineus longissimus
・ Lineville
・ Lineville, Alabama
・ Lineville, Iowa
・ Linevo Cove
・ LineWars II
・ Linewatch
・ Lineweaver–Burk plot
・ Linexert
・ Linezolid
・ Line–line intersection
・ Line–plane intersection
Line–sphere intersection
・ Linfen
・ Linfen Campaign
・ Linfen County
・ Linfen Qiaoli Airport
・ Linfeng, Chongqing
・ Linfen–Fushan Campaign
・ Linfield
・ Linfield Christian School
・ Linfield College
・ Linfield F.C.
・ Linfield Rangers
・ Linfield, Pennsylvania
・ Linfinity
・ Linford


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Line–sphere intersection : ウィキペディア英語版
Line–sphere intersection

In analytic geometry, a line and a sphere can intersect in three ways: no intersection at all, at exactly one point, or in two points. Methods for distinguishing these cases, and determining equations for the points in the latter cases, are useful in a number of circumstances. For example, this is a common calculation to perform during ray tracing (Eberly 2006:698).
== Calculation using vectors in 3D ==
In vector notation, the equations are as follows:
Equation for a sphere
:\left\Vert \mathbf - \mathbf \right\Vert^2=r^2
:
*\mathbf - center point
:
*r - radius
:
*\mathbf - points on the sphere
Equation for a line starting at \mathbf
:\mathbf=\mathbf + d\mathbf
:
*d - distance along line from starting point
:
*\mathbf - direction of line (a unit vector)
:
*\mathbf - origin of the line
:
*\mathbf - points on the line
Searching for points that are on the line and on the sphere means combining the equations and solving for d:
:Equations combined
::\left\Vert \mathbf + d\mathbf - \mathbf \right\Vert^2=r^2 \Leftrightarrow (\mathbf + d\mathbf - \mathbf) \cdot (\mathbf + d\mathbf - \mathbf) = r^2
:Expanded
::d^2(\mathbf\cdot\mathbf)+2d(\mathbf\cdot(\mathbf-\mathbf))+(\mathbf-\mathbf)\cdot(\mathbf-\mathbf)=r^2
:Rearranged
::d^2(\mathbf\cdot\mathbf)+2d(\mathbf\cdot(\mathbf-\mathbf))+(\mathbf-\mathbf)\cdot(\mathbf-\mathbf)-r^2=0
:The form of a quadratic formula is now observable. (This quadratic equation is an example of Joachimsthal's Equation ().)
::a d^2 + b d + c = 0
:where
:
*a=\mathbf\cdot\mathbf=\left\Vert\mathbf\right\Vert^2
:
*b=2(\mathbf\cdot(\mathbf-\mathbf))
:
*c=(\mathbf-\mathbf)\cdot(\mathbf-\mathbf)-r^2=\left\Vert\mathbf-\mathbf\right\Vert^2-r^2
:Simplified
::d=\frac-\mathbf)) \pm \sqrt-\mathbf))^2-\left\Vert\mathbf\right\Vert^2(\left\Vert\mathbf-\mathbf\right\Vert^2-r^2)}}
:Note that \mathbf is a unit vector, and thus \left\Vert\mathbf\right\Vert^2=1. Thus, we can simplify this further to
::d=-(\mathbf\cdot(\mathbf-\mathbf)) \pm \sqrt-\mathbf))^2-\left\Vert\mathbf-\mathbf\right\Vert^2+r^2}
*If the value under the square-root ((\mathbf\cdot(\mathbf-\mathbf))^2-\left\Vert\mathbf-\mathbf\right\Vert^2+r^2) is less than zero, then it is clear that no solutions exist, i.e. the line does not intersect the sphere (case 1).
*If it is zero, then exactly one solution exists, i.e. the line just touches the sphere in one point (case 2).
*If it is greater than zero, two solutions exist, and thus the line touches the sphere in two points (case 3).

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Line–sphere intersection」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.